cmake_minimum_required(VERSION 2.8)
PROJECT(serial)

MESSAGE(STATUS "CMAKE_C_COMPILER:${CMAKE_C_COMPILER}")
MESSAGE(STATUS "CMKAE_CXX_COMPILER:${CMKAE_CXX_COMPILER}")
MESSAGE(STATUS "CMAKE_CURRENT_SOURCE_DIR:${PROJECT_SOURCE_DIR}")
MESSAGE(STATUS "OpenCV library status:")
MESSAGE(STATUS "    version: ${OpenCV_VERSION}")
MESSAGE(STATUS "    libraries: ${OpenCV_LIBS}")
MESSAGE(STATUS "    include path: ${OpenCV_INCLUDE_DIRS}")

if(NOT WIN32)
ADD_DEFINITIONS("-std=c++0x -O3")
endif(NOT WIN32)

#find_package(OpenCV REQUIRED)

find_package(Boost COMPONENTS filesystem program_options REQUIRED)

if (Boost_FOUND)
  message(STATUS "Boost version: ${Boost_VERSION}")
  message(STATUS "Boost include dirs: ${Boost_INCLUDE_DIRS}")
  message(STATUS "Boost library dirs: ${Boost_LIBRARY_DIRS}")
else()
  message(FATAL_ERROR "Boost not found.")
endif()

include_directories(${CMAKE_SOURCE_DIR}/include)

#comm
#set(COMM_PATH /home/toybrick/dyt_project_process/comm)
#set(COMM_LIB ${COMM_PATH}/lib/libmycomm.so)

include_directories(/usr/include/boost/)
link_directories(/usr/lib/aarch64-linux-gnu/)

AUX_SOURCE_DIRECTORY(./src/ SRC_FILES)
ADD_EXECUTABLE(serial ${SRC_FILES})
target_link_libraries(serial ${Boost_LIBRARIES} pthread)

#/usr/include/boost/ -L








